import {connect} from 'react-redux'
import Play from 'components/play/Play'
import {setSong} from "../action";

const mapStateToProps = state => {
    return {
        currentSong: state.song,
        playSong: state.songs
    }
}
const mapDispatchToProps = (dispatch) => {
    return {
        setSong: (song, index) => {
            dispatch(setSong(song, index))
        }
    }
}

export default connect(mapStateToProps, mapDispatchToProps)(Play)